home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / 000002_amos-request@svcs1.digex.net_Wed Apr 2 05:03:21 1997.msg < prev    next >
Text File  |  1998-06-24  |  10KB  |  233 lines

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail1.access.digex.net (8.8.5/8.8.5) with ESMTP id FAA22208
  3.     for <mcox@access.digex.net>; Wed, 2 Apr 1997 05:03:20 -0500 (EST)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id DAA16303
  6.     for amos-out; Wed, 2 Apr 1997 03:33:31 -0500 (EST)
  7. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id DAA16300
  9.     for <amos-list@svcs1.digex.net>; Wed, 2 Apr 1997 03:33:30 -0500 (EST)
  10. Received: from f7.hotmail.com (F7.hotmail.com [207.82.250.18])
  11.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id DAA03772
  12.     for <amos-list@access.digex.net>; Wed, 2 Apr 1997 03:33:29 -0500 (EST)
  13. Received: (from root@localhost) by f7.hotmail.com (8.7.5/8.7.3) id AAA22712; Wed, 2 Apr 1997 00:15:50 -0800 (PST)
  14. Date: Wed, 2 Apr 1997 00:15:50 -0800 (PST)
  15. Message-Id: <199704020815.AAA22712@f7.hotmail.com>
  16. Received: from 193.214.146.22 by www.hotmail.com with HTTP;
  17.     Wed, 02 Apr 1997 00:15:50 PST
  18. X-Originating-IP: [193.214.146.22]
  19. From: " Ragnar  Fyri" <ragnar_fyri@hotmail.com>
  20. To: amos-list@access.digex.net
  21. Subject: Transition effects part 5 etc.
  22. Content-Type: multipart/mixed; boundary="====================987654321_0==_"
  23. X-Attachment: Textfile.txt
  24. Status: RO
  25. X-Status: 
  26.  
  27.  
  28. --====================987654321_0==_
  29. Content-Type: text/plain 
  30.  
  31.  
  32.  
  33. ---------------------------------------------------------
  34. Get Your *Web-Based* Free Email at http://www.hotmail.com
  35. ---------------------------------------------------------
  36.  
  37. --====================987654321_0==_
  38. Content-Type: text/plain; name="Textfile.txt"
  39. Content-Disposition: attachment; filename="Textfile.txt"
  40.  
  41.   Here we go again. Another month has come  to an end, and soon I can down-
  42. load the March archive and see if anyone ignored what I said about contact-
  43. ing me directly because I'm not  on  the  list.  [And  don't tell me how to
  44. subscribe, I have chosen not to because  downloading and processing all the
  45. induvidual messages is to much hassle. The only problem with what I'm doing
  46. now is that attached files come  out  as  Base64,  whatever THAT is. Anyone
  47. know how to convert those  cryptic  text  chunks  back  into their original
  48. form? (And if it can't be done, what's the point with including them in the
  49. archive in the first place?)
  50.   Talking of archives, here's a little  batch  file I put together for pro-
  51. cessing them.
  52.  
  53. ;Type f.ex. "ual 06 96" to unpack 0696.lhz to 9606
  54.  
  55. lha e <mo><ye>.lzh AMOSLIST
  56. rename AMOSLIST <ye><mo>
  57. ask "Delete <mo><ye>.lzh? "
  58. if warn
  59. delete <mo><ye>.lzh
  60. endif
  61.  
  62. This unpacks just the main file from  the  archive,  renames it and deletes
  63. the archive after asking just to be sure.  Renaming it means I can keep all
  64. the monthlies in the same directory (and  won't have to check the file date
  65. to see which is which either), and  switching  year  and month around means
  66. the files will get listed in  chronological  order  when sorted "alphabeti-
  67. cally" (On Aminet all the January  files  are  grouped together followed by
  68. all the February files and so on.).
  69.   BTW, because I use a PC to download  the  files  and MessyDos to transfer
  70. then to AmigaDOS, I have to shorten the filenames to month/year/suffix as I
  71. download them, and this file is  madeto  handle those shortened file names.
  72. If you download the files  directly  to  your  Amiga  under their  original
  73. names, change all references to "<mo><ye>.lzh" to "Amoslist-<mo><ye>.lzh".
  74.  
  75.   One of the things I found out while going  through last winter's mail was
  76. that one of the questions I  asked  recently  has  been asked twice before.
  77. Hey, does that make it a Frequently  Asked  Question?  At least it has been
  78. asked more frequently than "What is AMOS?",  which is the first question in
  79. the FAQ. (Look Mike, if we didn't  know  what Amos was we wouldn't be here,
  80. right?)
  81.  
  82.   But now it's time for a  Completely  Useless  Program.  Everyone  (with a
  83. manual) knows Amos has  a  command  called  Load  IFF  that  will load most
  84. pictures in a jiffy or two. Here's a  program  that  does the job in half a
  85. minute (wih a lo-res pic).
  86.  
  87. 'Load-ILBM by Mac Larsson 1988 
  88. ' AMOSized by Ragnar Fyri 1997 
  89. DEMOPIC:
  90. A$=Fsel$("") : Rem filename 
  91. B=1 : Rem screen number  
  92. T=Timer
  93. LPICILBM[A$,B]
  94. TD=Timer-T
  95.  Wait Key 
  96. Screen Close B
  97. Print "Operation took";TD;" clicks."
  98. End 
  99. Procedure LPICILBM[FILENAME$,SCRN]
  100.    Open In 1,FILENAME$
  101.    If Input$(1,4)<>"FORM" Then Goto FAIL
  102.    A$=Input$(1,4) : If Input$(1,8)<>"ILBMBMHD" Then Goto FAIL
  103.    A$=Input$(1,4) : CVI[Input$(1,2)] : WINDX=Param
  104.    CVI[Input$(1,2)] : WINDY=Param : A$=Input$(1,4)
  105.    DEEP=Asc(Input$(1,1)) : A$=Input$(1,1)
  106.    COMP=Asc(Input$(1,1)) : A$=Input$(1,5)
  107.    CVI[Input$(1,2)] : MXX=Param : CVI[Input$(1,2)] : MXY=Param
  108.    If Input$(1,4)<>"CMAP" Then Goto FAIL
  109.    CVL[Input$(1,4)] : NUMCOL=Param : RES=0
  110.    If MXX>320 Then Add RES,Hires
  111.    If MXY>256 Then Add RES,Laced
  112.    Screen Open SCRN,MXX,MXY,2^DEEP,RES
  113.    Curs Off : Flash Off : Hide On 
  114.    Dim CMAP(2),PLANE(DEEP-1)
  115.    For A=0 To NUMCOL/3-1
  116.       For B=0 To 2
  117.          CMAP(B)=(Asc(Input$(1,1)) and 240)
  118.       Next 
  119.       Colour A,(CMAP(0)*16)+CMAP(1)+(CMAP(2)/16)
  120.    Next 
  121.    For A=0 To DEEP-1
  122.       PLANE(A)=Leek(Screen Base+A*4)
  123.    Next 
  124.    While BODY<>4
  125.       If Instr("BODY",Input$(1,1)) Then BODY=BODY+1 Else BODY=0
  126.    Wend : A$=Input$(1,4)
  127.    If COMP=0
  128.       For A=1 To WINDY
  129.          For P=0 To DEEP-1
  130.             For B=0 To MXX/8-1 Step 4
  131.                CVL[Input$(1,4)] : Loke PLANE(P)+B,Param
  132.             Next 
  133.             PLANE(P)=PLANE(P)+MXX/8
  134.          Next 
  135.          Gosub BREAK
  136.       Next 
  137.    Else 
  138.       For A=0 To WINDY-1
  139.          For B=0 To DEEP-1
  140.             SCRROW=PLANE(B)+(A*MXX/8) : C=0
  141.             While C<MXX/8
  142.                CODEIN=Asc(Input$(1,1))
  143.                If CODEIN<128
  144.                   SCRDATA$=Input$(1,CODEIN+1)
  145.                   For J=1 To Len(SCRDATA$)
  146.                      Poke SCRROW+C+J-1,Asc(Mid$(SCRDATA$,J,1))
  147.                   Next 
  148.                   C=C+CODEIN+1
  149.                Else 
  150.                   If CODEIN>128
  151.                      INBYTE=Asc(Input$(1,1))
  152.                      For J=C To C+257-CODEIN
  153.                         Poke SCRROW+J,INBYTE
  154.                      Next 
  155.                      C=C+257-CODEIN
  156.                   End If 
  157.                End If 
  158.             Wend 
  159.          Next 
  160.          Gosub BREAK
  161.       Next 
  162.    End If 
  163.    Close 
  164.    Pop Proc
  165.    BREAK:
  166.    A$=Inkey$ : If A$<>"q" Then Return 
  167.    FAIL:
  168.    Cls : Print "Can't load picture!"
  169.    Wait Key 
  170.    Screen Close SCRN
  171.    Edit 
  172. End Proc
  173. '
  174. Procedure CVI[BYTES$]
  175.    NUMBER=Asc(BYTES$)*256
  176.    Add NUMBER,Asc(Right$(BYTES$,1))
  177. End Proc[NUMBER]
  178. '
  179. Procedure CVL[BYTES$]
  180.    CVIove" action="http://207.82.250.251/cgi-bin/nextprev">
  181. <input type="hidden" name="disk" value="207.82.250.104_d0">
  182. <input type="hidden" name="login" value="ragnar_fyri">
  183. <input type="hidden" name="f" value="1025">
  184. <input type="hidden" name="curmbox" value="ACTIVE">
  185. <input type="hidden" name="msg" value="MSG09712192">
  186. <input type="hidden" name="js" value="">
  187. <table border=0 cellpadding=0 cellspacing=0 width=498>
  188. <tr>
  189. <td width=76><input type=image name="Move To"
  190. src="http://207.82.250.8/do_move.gif" [Left$(BYTES$,2)] : NUMBER=Param*256^2
  191.    CVI[Right$(BYTES$,2)] : Add NUMBER,Param
  192. End Proc[NUMBER]
  193.  
  194.   Those who have been around for a while  may remember that AmigaBasic came
  195. with a couple of demo programs that  showed  how  to load and save pictures
  196. using library routines. A bit later  one  Mac  Larsson (see comment line 1)
  197. showed how it could be done entirely in Basic without libraries. I typed in
  198. the programs and  experimented  a  bit  with  them,  then  I filed the disk
  199. somewhere and forgot  about  it.  Recently  I  came  across  the disk while
  200. looking for someone else and decided to try to convert the programs to Amos
  201. just for fun and to see how fast it would  be. AmigaBasic has two functions
  202. called CVI and CVL (ConVert Integer and ConVert Long) that I had to emulate
  203. with procedures. [I tried using Def Fn, but that didn't work!]
  204.   As I said, it takes half a minute to  do  a plain 320*200*16 picture, and
  205. compiling only halves that,  so  what's  the  point?  Well, you can see the
  206. picture loading and learn a bit  about  how it's stored (and figure out why
  207. it's called InterLeaved BitMap), and figuring out how it works may help you
  208. understand the file format if you have  need for that. (Someone asked about
  209. that once, I think.)
  210.   Mac also wrote a  couple  of  programs  for  saving  ILBM  files, and for
  211. laoding and saving  ACBM  (Amiga  Continous  BitMap),  but  I haven't tried
  212. converting them yet. One problem  with  LoadACBM is that it seems to load a
  213. whole bitplane at a time into one st  Hi. Just checked  out  Elevators  after 
  214. I  noticed  the  title in an old
  215. Amoslist archive. (That's right, it  was  the  name that first attracted my
  216. attention...) It's a nice  twist  on  an  old  theme  with some pretty good
  217. graphics, but there are some details I can't say I like.
  218.   It's been ages since I saw a S&L board,  but as far as I remember, snakes
  219. would always take you at least  one  level  down  and  ladders at least one
  220. level up. In your game you move  the  counters  sideways  and call itring, and
  221. Amos it looks like Amos can't
  222. handle that, so it needs a major rewrite.  BTW, it may be possible to write
  223. faster versions of all the programs simply  by loading files into banks and
  224. moving data around with *eek and  Copy.  Probably is - it's all that string
  225. handling that slows things down...
  226.  
  227.   Talking of things Amos can't handle, I have this big file I tried reading
  228. as a random file, but the program crashed  when trying to read record 32769
  229. - that is 32K+1. Can't Amos  handle
  230. --====================987654321_0==_
  231. Content-Type: text/plain
  232.  
  233. --====================987654321_0==_--